unit Srv_TLB;

// ************************************************************************ //
// WARNING                                                                  //
// -------                                                                  //
// The types declared in this file were generated from data read from a     //
// Type Library. If this type library is explicitly or indirectly (via      //
// another type library referring to this type library) re-imported, or the //
// 'Refresh' command of the Type Library Editor activated while editing the //
// Type Library, the contents of this file will be regenerated and all      //
// manual modifications will be lost.                                       //
// ************************************************************************ //

// PASTLWTR : $Revision:   1.11.1.63  $
// File generated on 6/23/98 2:38:39 AM from Type Library described below.

// ************************************************************************ //
// Type Lib: C:\work\d4dg\code\Ch23\Automate\Srv.tlb
// IID\LCID: {17A05B84-0094-11D1-A9BF-F15F8BE883D4}\0
// Helpfile: 
// HelpString: D4DG Srv Library
// Version:    1.0
// ************************************************************************ //

interface

uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;

// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:      //
//   Type Libraries     : LIBID_xxxx                                    //
//   CoClasses          : CLASS_xxxx                                    //
//   DISPInterfaces     : DIID_xxxx                                     //
//   Non-DISP interfaces: IID_xxxx                                      //
// *********************************************************************//

const
  LIBID_Srv: TGUID = 
         '{17A05B84-0094-11D1-A9BF-F15F8BE883D4}';
  IID_IAutoTest: TGUID = 
         '{17A05B85-0094-11D1-A9BF-F15F8BE883D4}';
  CLASS_AutoTest: TGUID = 
         '{17A05B86-0094-11D1-A9BF-F15F8BE883D4}';

// *********************************************************************//
// Declaration of Enumerations defined in Type Library                  //
// *********************************************************************//
// TxShapeType constants

type
  TxShapeType = TOleEnum;

const
  stRectangle = $00000000;
  stSquare = $00000001;
  stRoundRect = $00000002;
  stRoundSquare = $00000003;
  stEllipse = $00000004;
  stCircle = $00000005;

type

// *********************************************************************//
// Forward declaration of interfaces defined in Type Library            //
// *********************************************************************//

  IAutoTest = interface;
  IAutoTestDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                     //
// (NOTE: Here we map each CoClass to its Default Interface)            //
// *********************************************************************//
  AutoTest = IAutoTest;


// *********************************************************************//
// Interface: IAutoTest
// Flags:     (4432) Hidden Dual OleAutomation Dispatchable
// GUID:      {17A05B85-0094-11D1-A9BF-F15F8BE883D4}
// *********************************************************************//
  IAutoTest = interface(IDispatch)
    ['{17A05B85-0094-11D1-A9BF-F15F8BE883D4}']

    procedure ShowInfo; safecall;

    function Get_ShapeType: TxShapeType; safecall;
    procedure Set_ShapeType(ShapeType: TxShapeType);
                                                                                    safecall;
    function Get_ShapeColor: OLE_COLOR; safecall;
    procedure Set_ShapeColor(ShapeColor: OLE_COLOR); 
                                                                                    safecall;
    function Get_EditText: WideString; safecall;
    procedure Set_EditText(const EditText: WideString); 
                                                                                    safecall;

    property ShapeType: TxShapeType 
                       read Get_ShapeType write Set_ShapeType;
    property ShapeColor: OLE_COLOR 
                       read Get_ShapeColor write Set_ShapeColor;
    property EditText: WideString 
                       read Get_EditText write Set_EditText;
  end;

// *********************************************************************//
// DispIntf:  IAutoTestDisp
// Flags:     (4432) Hidden Dual OleAutomation Dispatchable
// GUID:      {17A05B85-0094-11D1-A9BF-F15F8BE883D4}
// *********************************************************************//
  IAutoTestDisp = dispinterface
    ['{17A05B85-0094-11D1-A9BF-F15F8BE883D4}']
    property ShapeType: TxShapeType dispid 1;
    property ShapeColor: OLE_COLOR dispid 2;
    property EditText: WideString dispid 3;
    procedure ShowInfo; dispid 4;
  end;

  CoAutoTest = class
    class function Create: IAutoTest;
    class function CreateRemote(const 
                            MachineName: string): IAutoTest;
  end;

implementation

uses ComObj;

class function CoAutoTest.Create: IAutoTest;
begin
  Result := CreateComObject(CLASS_AutoTest) 
                                                                as IAutoTest;
end;

class function CoAutoTest.CreateRemote(const 
                                  MachineName: string): IAutoTest;
begin
  Result := CreateRemoteComObject(MachineName, 
                                   CLASS_AutoTest) as IAutoTest;
end;

end.
